package com.tecnoagrosoft.zafra.control.activity.fragment;

import com.tecnoagrosoft.zafra.control.activity.R;
import com.tecnoagrosoft.zafra.control.utils.PagerSlidingTabStrip;
import com.tecnoagrosoft.zafra.control.utils.ViewPagerAdapter;


import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;



public class HomeMain extends Fragment {
	
	View rootView;
	
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		
		rootView = inflater.inflate(R.layout.home_main, container, false);
		   int color = Color.parseColor("#33B679");
	      
		    ViewPager pager = (ViewPager) rootView.findViewById(R.id.pager);
		   
		    ViewPagerAdapter viewPagerAdapter= new ViewPagerAdapter(getFragmentManager()); 
            pager.setAdapter(viewPagerAdapter);
            pager.setCurrentItem(1);

	        PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) rootView.findViewById(R.id.tabs);
	        tabs.setIndicatorColor(color);
	        tabs.setViewPager(pager);
		
		
		return rootView;
	}
	
	
}